extends Area2D

@export var CurrentState: SpikeStates
enum SpikeStates {
	ACTIVE,
	ANIMATED
}

func _process(delta):
	match CurrentState:
		SpikeStates.ACTIVE:
			active()
		SpikeStates.ANIMATED:
			active_animated()

func active():
	$AnimationPlayer.play("active")


func active_animated():
	$AnimationPlayer.play("active_animated")


func _on_body_entered(body: Node2D) -> void:
	if body.name == "Player":
		PlayerData.PlayerHP -= 1
		
